package com.ruoyi.teaching.dao;

import com.ruoyi.teaching.domain.JPosition;
import org.springframework.context.annotation.Bean;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @Author 一阵风r
 * @Date 2022/3/22 17:14
 * @Version 1.0
 */
@Repository
public interface JPositionDao extends JpaRepository<JPosition, Long>, JpaSpecificationExecutor<JPosition> {

//    @Query(value = "select * from role where role = ?1", nativeQuery = true)

        List<JPosition> findByProvinceId(String provinceId);

        List<JPosition> findBytownId(String townId);

        List<JPosition> findByCountyId(String countyId);

        List<JPosition> findByCityId(String cityId);
}
